package com.cyjt.operation.ui;

import com.cyjt.operation.R;
import com.cyjt.operation.bean.WorkOrder;
import com.cyjt.operation.view.ActionBarLayout;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

/**
 * 工单详情的Activity
 * 
 * @author LTP
 *
 */
public class WorkOrderDetails extends Activity {
	private TextView textView_workorder_id, textView_workorder_type,
			textView_workorder_sendorder_time,
			textView_workorder_receiveorder_time,
			textView_workorder_planed_finish_time,
			textView_workorder_actual_finish_time,
			textView_workorder_solution_way, textView__workorder_description;
	private WorkOrder workOrder;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_workorder_details);
		workOrder = (WorkOrder) getIntent().getSerializableExtra("workOrder");
		initView();
	}

	/**
	 * 控件初始化
	 */
	private void initView() {
		ActionBarLayout.setTitle("工单详情");
		// TODO Auto-generated method stub
		textView_workorder_id = (TextView) findViewById(R.id.textView_workorder_id);
		textView_workorder_id.setText(workOrder.getId() + "");
		textView_workorder_type = (TextView) findViewById(R.id.textView_workorder_type);
		textView_workorder_type.setText(workOrder.getType() + "");
		textView_workorder_sendorder_time = (TextView) findViewById(R.id.textView_workorder_sendorder_time);
		textView_workorder_sendorder_time.setText(workOrder.getTime() + "");
		textView_workorder_receiveorder_time = (TextView) findViewById(R.id.textView_workorder_receiveorder_time);
		// textView_workorder_receiveorder_time.setText(text);
		textView_workorder_planed_finish_time = (TextView) findViewById(R.id.textView_workorder_planed_finish_time);
		// textView_workorder_planed_finish_time.setText(text);
		textView_workorder_actual_finish_time = (TextView) findViewById(R.id.textView_workorder_actual_finish_time);
		// textView_workorder_actual_finish_time.setText(text);
		textView_workorder_solution_way = (TextView) findViewById(R.id.textView_workorder_solution_way);
		textView_workorder_solution_way.setText(workOrder.getDeadline() + "");
		textView__workorder_description = (TextView) findViewById(R.id.textView__workorder_description);
		// textView__workorder_description.setText(text);
	}
}
